<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
<title>{$school['shoucename']}</title>
<meta name="viewport" content="width=device-width, initial-scale=1.0, user-scalable=no">
{php include $this->template('shoucecss');}
{php echo register_jssdk();}
<script src="http://res.wx.qq.com/open/js/jweixin-1.0.0.js"></script>
<style type="text/css">
#slider blockquote {color: #000;}
body {background-color: #e7faff;}
.demo-2 .deco {width: 100px;height: 100px;position: absolute;top:65px;left: 50%;margin: 0 0 0 -50px;background:url({php echo tomedia($school['logo'])}) center no-repeat;;background-size:96px;background-position:center;}
.demo-2 .deco2 {width: 140px;height: 140px;position: absolute;top:45px;left: 50%;margin: 0 0 0 -60px;background:url({php echo tomedia($scset['top5'])}) center no-repeat;background-size:140px;background-position:center;}
.demo-2 .bg-img-1 {background-image: url({php echo tomedia($scset['bg1'])});background-size:auto 100%;}
.demo-2 .bg-img-2 {background-image: url({php echo tomedia($scset['bg2'])});}
.demo-2 .bg-img-3 {background-image: url({php echo tomedia($scset['bg3'])});}
.demo-2 .bg-img-4 {background-image: url({php echo tomedia($scset['bg4'])});}
.demo-2 .bg-img-5 {background-image: url({php echo tomedia($scset['bg5'])});}
.demo-2 .bg-img-6 {background-image: url({php echo tomedia($scset['bg6'])});}
@media screen and (max-width: 660px) {.demo-1 .deco {width: 100px;height: 100px;margin-left: -50px;margin-top: 65px;}
.demo-1 [data-icon]:after {width: 110px;height: 110px;line-height: 110px;font-size: 40px;margin: -55px 0 0 -55px;}
.demo-1 .sl-slide blockquote {margin-bottom: -120px;}
.demo-1 .sl-slide h2 {line-height: 22px;font-size: 18px;margin-bottom: -40px;letter-spacing: 8px;}
.demo-1 .sl-slide blockquote p:before {line-height: 10px;width: 40px;height: 40px;font-size: 120px;left: -45px;}
.demo-2 .sl-slider-wrapper {height: 500px;}
.demo-2 .sl-slider h2 {font-size: 18px;background:rgba(0,0,0,.5);padding:10px;margin-top:60px;border-radius:0px 0px 0 0;}
.demo-2 .sl-slider blockquote {font-size: 13px;color: #000;padding:0px;line-height:22px;}
.text_title{position:absolute;top:-35px;left:0px;right:0px;z-index:9999;height:35px;border-radius:6px 6px 0 0;background-color:rgba(0,0,0,.7);}
.btn_back{display:inline-block;margin-left:5px;width:35px;height:35px;background:url({OSSURL}public/mobile/img/intro_icon_home_51x50.png) no-repeat center center;background-size:25px;}}
.demo-2 .bg-img-1 {position:absolute;background-image: url({OSSURL}public/mobile/img/share_cover_bg.jpg);background-size:auto 100%;}
.demo-2 .sl-slider blockquote.ilike_info_box .ilike_mama_do .point_icon{ display: inline; height: 20px; width: 20px; background: url({OSSURL}public/mobile/img/pointerto_icon.png) no-repeat left center; background-size: 20px; line-height: 30px; font-size: 16px;}
.btn_music{background-image: url({OSSURL}public/mobile/img/on_03.png?v=1); background-repeat: no-repeat;}
</style>
</head>
<script type="text/javascript" src="{MODULE_URL}public/mobile/js/jquery-1.11.3.min.js?v=4.8"></script>
<script type="text/javascript" src="{OSSURL}public/mobile/js/manual_share_js.js?v=1111"></script>
<script type="text/javascript">
    /* if(location.href.indexOf("act=share")==-1){
        window.location.href=location.href.split('?')[0] + '?act=share';
    } */
    //if (location.href.indexOf('?') > 0) {
    //    window.location.href = location.href.split('?')[0];
    //}
</script>
<body>
<div class="container demo-2">
	<div id="slider" class="sl-slider-wrapper">
		<div class="sl-slider">
			<div class="sl-slide" data-orientation="horizontal" data-slice1-rotation="3" data-slice2-rotation="3" data-slice1-scale="2" data-slice2-scale="1">
				<div class="sl-slide-inner">
					<div class="bg-img bg-img-1"></div>
					<div class="deco" data-icon="t"></div>
					<blockquote class="manual_info_box">
						<div class="kindergarten_name">{$school['title']}</div>
						<div class="manual_name_text">{$shouce['title']}</div>
						<div class="student_info_text">（{$bjidname['sname']}<span class="point"></span>{$student['s_name']}）</div>
					</blockquote>
				</div>
			</div>
			<div class="sl-slide" data-orientation="horizontal" data-slice1-rotation="-25" data-slice2-rotation="-25" data-slice1-scale="2" data-slice2-scale="2">
				<div class="sl-slide-inner" style="overflow: auto;">
					<div class="bg-img bg-img-2"></div>
					<blockquote>
						<div class="manual_main2">
							<div class="manual_visible_box">
								<div class="manual_til_img2">
									<img src="{php echo tomedia($scset['top1'])}" />
								</div>
								<div class="manual_main_box2">
									<ul class="manual_baby_situation_ul">
									{loop $list1 $row}
										<li>
											<div class="li_block">{$row['title']}</div>
											<div class="li_block">
												<div class="situation_level1" style="background-image: url({php echo tomedia($row['icon'])})">{$row['icontitle']}</div>
											</div>
										</li>
									{/loop}	
									</ul>
									<div class="blank"></div>
								</div>
							</div>
						</div>
					</blockquote>
				</div>
			</div>
			<div class="sl-slide" data-orientation="horizontal" data-slice1-rotation="3" data-slice2-rotation="3" data-slice1-scale="2" data-slice2-scale="1">
				<div class="sl-slide-inner">
					<div class="bg-img bg-img-3"></div>
					<blockquote>
						<div class="manual_main2">
							<div class="manual_visible_box">
								<div class="manual_til_img3">
									<img src="{php echo tomedia($scset['top3'])}" />
								</div>
								<div class="small_blank"></div>
								{loop $alllspl $row}
									<div class="evaluation_box" style="border-right: 50px;">
										<div class="evaluation_photo">
											<img src="{php echo tomedia($row['thumb'])}"></div>
										<div class=" evaluation_box_text2">
											<div class="evaluation_box_til3">{$row['tname']}老师</div>
											<div class="time">{$row['time']}前</div>
										</div>
										<div class="evaluation_box_content">{$row['tword']}</div>
									</div>
								{/loop}
								<div class="blank"></div>
							</div>
						</div>
					</blockquote>
				</div>
			</div>
			<div class="sl-slide" data-orientation="vertical" data-slice1-rotation="-5" data-slice2-rotation="25" data-slice1-scale="2" data-slice2-scale="1">
				<div class="sl-slide-inner">
					<div class="bg-img bg-img-4"></div>

					<blockquote>
						<div class="manual_main2">
							<div class="manual_visible_box">
								<div class="manual_til_img3">
									<img src="{php echo tomedia($scset['top2'])}" />
								</div>
								<div class="small_blank"></div>
								<div class="manual_main_box2">
									<ul class="manual_baby_situation_ul">
									{loop $list2 $row}
										<li>
											<div class="li_block">{$row['title']}</div>
											<div class="li_block">
												<div class="situation_level1" style="background-image: url({php echo tomedia($row['icon'])})">{$row['icontitle']}</div>
											</div>
										</li>
									{/loop}	
									</ul>
									<div class="blank"></div>
								</div>
							</div>
						</div>
					</blockquote>
				</div>
			</div>
			<div class="sl-slide" data-orientation="horizontal" data-slice1-rotation="-5" data-slice2-rotation="10" data-slice1-scale="2" data-slice2-scale="1">
				<div class="sl-slide-inner">
					<div class="bg-img bg-img-5"></div>

					<blockquote>
						<div class="manual_main2">
							<div class="manual_visible_box">
								<div class="manual_til_img3">
									<img src="{php echo tomedia($scset['top4'])}" />
								</div>
								<div class="small_blank"></div>
								{loop $alljzpl $row}
									<div class="evaluation_box" style="border-right: 50px;">
										<div class="evaluation_photo">
											<img src="{php echo tomedia($row['thumb'])}"></div>
										<div class=" evaluation_box_text2">
											<div class="evaluation_box_til3">{$row['tname']}</div>
											<div class="time">{$row['time']}前</div>
										</div>
										<div class="evaluation_box_content">{$row['jzword']}</div>
									</div>
								{/loop}
									<div class="blank"></div>
							</div>
						</div>
					</blockquote>
				</div>
			</div>
			<div class="sl-slide" data-orientation="horizontal" data-slice1-rotation="-25" data-slice2-rotation="-25" data-slice1-scale="2" data-slice2-scale="2">
				<div class="sl-slide-inner">
					<div class="bg-img bg-img-6"></div>
					<div class="deco2" data-icon="t"><span class="add1">+1</span></div>
					<blockquote class="ilike_info_box">
						<div class="ilike_number"><span>{$snum}</span>人喜欢</div>
						<div class="ilike_mama_do"><span class="point_icon">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span class="do_text">{$scset['lasttxet']}</span></div>
						<div class="ilike_bbs_btn">{$scset['bottext']}</div>

					</blockquote>
					<div class="share_info_box">
						<div>{$scset['guidword1']}：<span class="wx_number_name">{$_W['uniaccount']['name']}</span></div>
						<div class="wx_someting">{$scset['guidword2']}</div>

					</div>
					<div id="mcover" style="display: none;">
						<img src="{OSSURL}public/mobile/img/share1.png">
					</div>
				</div>
			</div>
		</div>
	</div>
	<nav id="nav-dots" class="nav-dots">
		<span class="nav-dot-current"></span>
		<span></span>
		<span></span>
		<span></span>
		<span></span>
		<span></span>
	</nav>
</div>
<div id="musicWrap" class="music_wrap">
	<i id="audioBtn" class="btn_music">
		<audio controls="controls" loop="loop" autoplay="autoplay" src="{$urls}{$scset['bgm']}" style="display: none; opacity: 0;" id="audio_obj"></audio>
	</i>
</div>
<script type="text/javascript">
var inviteLink = window.location.href;
var xxindex = (window.location.href).indexOf("?");
if (xxindex > -1) {
	inviteLink = (window.location.href).substr(0, xxindex);
}
var data_url = encodeURIComponent(location.href.split('#')[0]);
$(function () {
	//背景音乐播放
	var myaudio = document.getElementById("audio_obj");
	myaudio.play();
	$(".btn_music").addClass("on");
	$(".btn_music").on("touchstart", function (e) {
		e.stopPropagation();
		if ($(this).hasClass("on")) {
			$(this).removeClass("on");
			myaudio.pause();
		} else {
			$(this).addClass("on");
			myaudio.play();
		}
	});


	var PARAMS = location.search.length > 1 ? { "?": location.search.substr(1) } : false;
	getParams = function () {
		if (PARAMS["?"]) {
			var temp;
			$.each(PARAMS["?"].split("&"), function (i, item) {
				temp = item.split("=");
				PARAMS[decodeURIComponent(temp[0])] = decodeURIComponent(temp[1]);
			});
		}
		return PARAMS;
	},
	getParam = function (arg) {
		if (arg) {
			var params = getParams();
			return params[arg];
		} else {
			return false;
		}
	}

	/*  if(getParam("act") == 'share'){
		 $("#mcover").show();
	 } */

	$('.ilike_bbs_btn').on('touchstart', function () {
		window.location.href = "{$scset['boturl']}";
	});

	$("#mcover").on("touchstart", function (e) {
		e.stopPropagation();
		e.preventDefault();
		$(this).css("display", "none");
	})
	var has_click = true;
	$(".deco2").on("touchstart", function () {
		if (has_click) {
			$(this).css({ webkitTransform: "scale(0.8)", webkitTransition: "transform 1s ease-in-out" });
			$(".add1").stop(true, true).animate({ "opacity": "1", "margin-top": "-30px", "font-size": "30px" }).animate({ "opacity": "0" }).animate({ "margin-top": "0px", "font-size": "14px" });
			$(".ilike_number span").text(parseInt($(".ilike_number span").text()) + 1);
			//has_click=false;
		}
	})
	$(".deco2").on("touchend", function () {
		if (has_click) {
			$(this).css({ webkitTransform: "scale(1)", webkitTransition: "transform 1s ease-in-out" });

			var share_file = location.href.split('/')[location.href.split('/').length - 1];
			share_file = share_file.split('.')[0];
			//alert(share_file);
			//添加点赞
			$.ajax({
				url: "{php echo $this->createMobileUrl('scplforxs', array('weid' => $weid,'schoolid' => $schoolid,'scid' => $scid,'sid' => $sid,'op' => 'dianzan','openid' => $openid), true)}",
				data: { 'filename': share_file },
				dataType: 'json',
				success: function (data) {
					alert(data.info, function () {});
				}
			});
			has_click = false;
		}

	})
	$(".share_info_box").on("touchstart", function (e) {
		e.stopPropagation();
		e.preventDefault();

		window.location.href = "{$scset['guidurl']}";
	})
	$('.sl-slider-wrapper').height($(window).height());
	var Page = (function () {
		var $nav = $('#nav-dots > span'), slitslider = $('#slider').slitslider({
			//interval : 2000,
			//autoplay : true,
			onBeforeChange: function (slide, pos) {
				$nav.removeClass('nav-dot-current');
				$nav.eq(pos).addClass('nav-dot-current');
			}
		}), init = function () {
			initEvents();
		}, initEvents = function () {

			$nav.each(function (i) {

				$(this).on('click', function (event) {

					var $dot = $(this);

					if (!slitslider.isActive()) {

						$nav.removeClass('nav-dot-current');
						$dot.addClass('nav-dot-current');

					}

					slitslider.jump(i + 1);
					return false;

				});
			});

		};
		$('body').swipe({
			swipeLeft: function (event, direction, distance, duration, fingerCount) {
				slitslider.next();
			},
			swipeRight: function (event, direction, distance, duration, fingerCount) {
				slitslider.previous();
			}
		});

		return {
			init: init
		};
	})();
	Page.init();
});
</script>
<script>
wx.ready(function () {
	sharedata = {
		title: '{$shouce['title']}-{$student['s_name']}',
		desc: '{$scset['guidword2']}',
		link: '{$links}',
		imgUrl: '{php echo tomedia($scset['icon'])}',
		success: function(){
			
		},
		cancel: function(){

		}
	};
	wx.onMenuShareAppMessage(sharedata);
	//wx.onMenuShareTimeline(sharedata);
});

$(function() {

	WeixinJSShowShareMenu();

    WeixinJSShowProfileMenuAndShare();
		
});

function WeixinJSShowShareMenu(){
	if (typeof wx != "undefined"){
		wx.ready(function () {
			wx.showMenuItems({
			    menuList: ['menuItem:share:appMessage','menuItem:share:timeline'] // 要显示的菜单项，所有menu项见附录3
			});
		});
	}
}	


function WeixinJSShowProfileMenuAndShare(){
	
	if (typeof wx != "undefined"){
		wx.ready(function () {
			wx.showMenuItems({
			    menuList: ['menuItem:share:appMessage','menuItem:share:timeline','menuItem:profile','menuItem:addContact','menuItem:favorite'] // 要显示的菜单项，所有menu项见附录3
			});
		});
	}
}
var WeixinApi = (function () {
	
	return {
        ready           :wxJsBridgeReady,
		shareToTimeline :weixinShareTimeline,
		shareToFriend   :weixinSendAppMessage,
        imagePreview    :imagePreview
    }; 
	
    "use strict";

    /**
     * 调起微信Native的图片播放组件。
     * 这里必须对参数进行强检测，如果参数不合法，直接会导致微信客户端crash
     *
     * @param {String} curSrc 当前播放的图片地址
     * @param {Array} srcList 图片地址列表
     */
    function imagePreview(curSrc,srcList) {
        if(!curSrc || !srcList || srcList.length == 0) {
            return;
        }
        WeixinJSBridge.invoke('imagePreview', {
            'current' : curSrc,
            'urls' : srcList
        });
    }
	
    /**
     * 当页面加载完毕后执行，使用方法：
     * WeixinApi.ready(function(Api){
     *     // 从这里只用Api即是WeixinApi
     * });
     * @param readyCallback
     */
    function wxJsBridgeReady(readyCallback) {
        if (readyCallback && typeof readyCallback == 'function') {
            var Api = this;
            var wxReadyFunc = function () {
                readyCallback(Api);
            };
            if (typeof window.WeixinJSBridge == "undefined"){
                if (document.addEventListener) {
                    document.addEventListener('WeixinJSBridgeReady', wxReadyFunc, false);
                } else if (document.attachEvent) {
                    document.attachEvent('WeixinJSBridgeReady', wxReadyFunc);
                    document.attachEvent('onWeixinJSBridgeReady', wxReadyFunc);
                }
            }else{
                wxReadyFunc();
            }
        }
    }

    return {
        version         :"2.5",
        ready           :wxJsBridgeReady,
		shareToTimeline :weixinShareTimeline,
		shareToFriend   :weixinSendAppMessage,
        imagePreview    :imagePreview
    };
})();
</script>
</body>
</html>